/*
 ============================================================================
 Name		: MyS60AlarmAppUi.cpp
 Author	  : 
 Copyright   : Your copyright notice
 Description : CMyS60AlarmAppUi implementation
 ============================================================================
 */

// INCLUDE FILES
#include <avkon.hrh>
#include <aknmessagequerydialog.h>
#include <aknnotewrappers.h>
#include <stringloader.h>
#include <f32file.h>
#include <s32file.h>
//#include <hlplch.h>

#include <MyS60Alarm.rsg>

//#include "MyS60Alarm_0xE2794FE0.hlp.hrh"
#include "MyS60Alarm.hrh"
#include "MyS60Alarm.pan"
#include "MyS60AlarmApplication.h"
#include "MyS60AlarmAppUi.h"
#include "MyS60AlarmAppView.h"

_LIT(KFileName, "C:\\private\\E2794FE0\\MyS60Alarm.txt");
_LIT(KText, "Hello World!");

// ============================ MEMBER FUNCTIONS ===============================


// -----------------------------------------------------------------------------
// CMyS60AlarmAppUi::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CMyS60AlarmAppUi::ConstructL()
	{
	// Initialise app UI with standard value.
	BaseConstructL(CAknAppUi::EAknEnableSkin);

	// Create view object
	iAppView = CMyS60AlarmAppView::NewL(ClientRect() );
	AddToStackL(iAppView);
	
	User::LeaveIfError(iRAs.Connect());
	}

// -----------------------------------------------------------------------------
// CMyS60AlarmAppUi::CMyS60AlarmAppUi()
// C++ default constructor can NOT contain any code, that might leave.
// -----------------------------------------------------------------------------
//
CMyS60AlarmAppUi::CMyS60AlarmAppUi()
	{
	
	}

// -----------------------------------------------------------------------------
// CMyS60AlarmAppUi::~CMyS60AlarmAppUi()
// Destructor.
// -----------------------------------------------------------------------------
//
CMyS60AlarmAppUi::~CMyS60AlarmAppUi()
	{
	if (iAppView)
		{
		RemoveFromStack(iAppView);
		delete iAppView;
		iAppView = NULL;
		}
	
		iRAs.Close();
	}

// -----------------------------------------------------------------------------
// CMyS60AlarmAppUi::HandleCommandL()
// Takes care of command handling.
// -----------------------------------------------------------------------------
//
void CMyS60AlarmAppUi::HandleCommandL(TInt aCommand)
	{
	switch (aCommand)
		{
		case EEikCmdExit:
		case EAknSoftkeyExit:
			Exit();
			break;
		case EEmpty:
			{
			//implementations needed in the future
			}
			break;
		default:
			Panic(EMyS60AlarmUi);
			break;
		}
	}
// -----------------------------------------------------------------------------
//  Called by the framework when the application status pane
//  size is changed.  Passes the new client rectangle to the
//  AppView
// -----------------------------------------------------------------------------
//
void CMyS60AlarmAppUi::HandleStatusPaneSizeChange()
	{
	iAppView->SetRect(ClientRect() );
	}

RASCliSession CMyS60AlarmAppUi::AlarmServerSession()
	{
	return iRAs;
	}
	
// End of File
